<template>
   <div>{{copyFoo}}
     <el-button @click='btnSync'>sync</el-button>
   </div>
</template>
<script>
export default {
  data () {
    return {
      copyFoo: this.foo
    }
  },
  props: {
    foo: String
  },
  methods: {
    outPut () {
      console.log(event.target.value)
      this.$emit('input', event.target.value)
    },
    btnSync () {
      this.copyFoo = '456'
      this.$emit('update:foo', this.copyFoo)
    }
  }
}
</script>
